<template>
    <form action="/">
<!--        <van-search-->
<!--            v-model="value"-->
<!--            show-action-->
<!--            placeholder="请输入搜索关键词"-->
<!--            @search="onSearch"-->
<!--            @cancel="onCancel"-->
<!--            @click="hideMenu"-->


<!--        />-->
        <van-search
            v-model="value"
            show-action
            label="地址"
            placeholder="请输入搜索关键词"
            @search="onSearch"
        >
            <template #action>
                <div @click="hideMenu">取消</div>
            </template>
        </van-search>

    </form>

</template>


<script setup>
import {defineProps, ref} from 'vue';
    import { showToast } from 'vant';
import { defineEmits } from 'vue';
    const value = ref('');
    const onSearch = (val) => showToast(val);
    const onCancel = () => showToast('取消');

    const props = defineProps({
    isShowMenu: {
        type: Boolean,
        required: true,
    },
});
const change=()=>{
    props.isShowMenu=!props.isShowMenu
}
const emits=defineEmits(['hidden'])
const hideMenu=()=>{
    emits('hidden',false);
}
</script>




<style lang="scss" scoped>

</style>